package sk.isomi.operators.flags;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class RunApp {

	/**
	 * @param args
	 * @throws ParseException 
	 */
	public static void main(String[] args) throws ParseException  {
		Font font = new Font("Sans Serif", 12, FontConst.UNDERLINE | FontConst.ITALIC);
		font.checkFlags();
		
		//1. Date -> ctor
		Date date1 = new Date();
		Date date2 = new Date(-1000000);
		
		//2. Date -> methods
		long milis = date1.getTime();
		
		//3. SimpleDateFormat -> ctor
		SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");
		
		//4. SimpleDateFormat -> methods
		String strDate = sdf.format(date1);
		
		sdf.setLenient(false);
		Date newDate = sdf.parse(strDate);
		
		//5. Calendar -> methods
		Calendar calendar = Calendar.getInstance();
		Date date3 = calendar.getTime();		
		calendar.setTime(date1);
		
		calendar.add(Calendar.DAY_OF_YEAR, 1000);
		calendar.add(Calendar.DAY_OF_YEAR, -1000);
		int year = calendar.get(Calendar.YEAR);
		calendar.set(2011, 06, 10); //Not June, but July
		calendar.set(2011, Calendar.JUNE, 10); 
		calendar.set(Calendar.YEAR, 2011);
				
		
	}

}
